<template>
    <el-tag class="ml-2" :type="statusList[(Number(state) - 1) as any] && statusList[(Number(state) - 1) as any].type">{{
        statusList[(Number(state) - 1) as any] && $t(statusList[(Number(state) - 1) as any].text) }}</el-tag>
</template>

<script lang="ts" setup>


withDefaults(defineProps<{ state: string | number }>(), {
    state: '0',
})

const statusList = ref([
    {
        text: "Order.NonPayment",
        type: "warning"
    },
    {
        text: "Order.unshipped",
        type: ""
    },
    {
        text: "Order.NotReceiveTheGoods",
        type: ""
    },
    {
        text: "Order.unrated",
        type: ""
    },
    {
        text: "Order.completed",
        type: "success"
    },
    {
        text: "Order.Lose",
        type: 'info'
    },
])
</script>